Skip to content

Narrow band implementation and major refactoring#83

Merged
maltezfaria merged 12 commits intomainfrom
narrow-band
Apr 1, 2026
Merged

Narrow band implementation and major refactoring#83
maltezfaria merged 12 commits intomainfrom
narrow-band

Conversation

@maltezfaria
Copy link
Copy Markdown
Owner

Implementation of a narrow-band approach (still experimental). Some major code refactoring was needed. I also took the liberty to change some of the names (e.g. levelset --> ic in the constructor of LevelSetEquation), so this PR introduces breaking changes to the API.

- Add `AbstractDomain`/`FullDomain`/`NarrowBandDomain` hierarchy to `meshfield.jl`;
  `MeshField` gains a fourth type parameter `D <: AbstractDomain`
- Add `logging.jl`: `StepRecord` and `SimulationLog` for per-step timing/history
- Refactor `LevelSetEquation`: rename `levelset` → `ic`, replace `buffers` with
  `log::SimulationLog`, overhaul `show` output
- Refactor `timestepping.jl`: add doctests, support `NarrowBandDomain` dispatch
- Refactor `reinitializer.jl`: improvements to `NewtonReinitializer` and `NewtonSDF`
- Various cleanups to `boundaryconditions.jl`, `meshes.jl`, `levelset.jl`,
  `levelsetterms.jl`, `derivatives.jl`, `interpolation.jl`, `velocityextension.jl`
- Add `NarrowBandLevelSet`: a `MeshField` backed by a `Dict` for sparse storage
- Constructors from `LevelSet`, and from scratch via a signed-distance function
- Narrow-band reinitializiation, band update (`update_narrowband!`), and
  extrapolation of ghost values at band boundary
- Integrate narrow-band support into `LevelSetEquation` and time steppers
- Add tests for: meshfield, levelsetequation, levelsetterms, reinitializer,
  narrow-band, show output, timestepping, spiral convergence
- Update existing tests to match refactored API (`ic` kwarg, new BC types, etc.)
- Remove obsolete test-reinitialization.jl and test-sdf.jl (replaced by
  test-reinitializer.jl)
- Update docs to reflect new API (`ic` kwarg, new BC names, `NarrowBandLevelSet`)
- Expand Makie extension with narrow-band plotting support
- Minor updates to MMG extensions for new `LevelSetEquation` struct layout
- Add *.markdown-preview.html to .gitignore
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 83.68545% with 139 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.09%. Comparing base (be8bb3a) to head (58a3794).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
ext/MakieExt.jl 0.00% 64 Missing ⚠️
src/levelset.jl 22.22% 21 Missing ⚠️
src/reinitializer.jl 84.12% 10 Missing ⚠️
src/interpolation.jl 78.57% 9 Missing ⚠️
src/narrowband.jl 93.10% 8 Missing ⚠️
src/boundaryconditions.jl 85.71% 5 Missing ⚠️
src/levelsetequation.jl 85.71% 5 Missing ⚠️
src/logging.jl 93.44% 4 Missing ⚠️
src/meshfield.jl 93.93% 4 Missing ⚠️
src/timestepping.jl 98.95% 3 Missing ⚠️
... and 5 more

❗ There is a different number of reports uploaded between BASE (be8bb3a) and HEAD (58a3794). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (be8bb3a) HEAD (58a3794)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   85.77%   76.09%   -9.69%     
==========================================
  Files          14       16       +2     
  Lines        1308     1694     +386     
==========================================
+ Hits         1122     1289     +167     
- Misses        186      405     +219     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maltezfaria maltezfaria merged commit e3c2767 into main Apr 1, 2026
6 checks passed
@maltezfaria maltezfaria deleted the narrow-band branch April 1, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant